package com.anjie.powerproject.map;

import com.anjie.powerproject.entity.DynamicProperty;
import com.anjie.powerproject.pojo.dto.DynamicPropertyDTO;
import com.anjie.powerproject.pojo.dto.DynamicPropertyDetail;
import com.anjie.powerproject.util.ExpressUtil;

import java.util.List;

public interface DynamicPropertyMap {

    DynamicPropertyDTO toDTO(DynamicProperty dynamicProperty);

    List<DynamicPropertyDTO> toDTO(List<DynamicProperty> dynamicProperties);

    DynamicProperty toEntity(DynamicPropertyDTO propertyDTO);

    List<DynamicProperty> toEntity(List<DynamicPropertyDTO> propertyDTOS);

    default String toExpress(List<DynamicPropertyDetail> details) {
        return ExpressUtil.dtoToExpress(details);
    }
}
